package com.jymj.enumEntity.yl;

/**
 * Created by ${lc} on 2020/4/1. 特殊情况
 */
public enum TsqkEnum {
    zero("一户多宅", "1"),
    one("本村买卖", "2"),
    two("外地买卖", "3"),
    three("户口迁出", "5");
    // 成员变量
    private String name;
    private String index;

    // 构造方法
    private TsqkEnum(String name, String index) {
        this.name = name;
        this.index = index;
    }

    // 普通方法
    public static String getName(String index) {
        for (TsqkEnum s : TsqkEnum.values()) {
            if (s.getIndex().equals(index)) {
                return s.name;
            }
        }
        return null;
    }


    // get set 方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIndex() {
        return index;
    }

    public void setIndex(String index) {
        this.index = index;
    }
}
